home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Utilities ƒ / MPW Tools ƒ / Simula4.07 / Simula 4.07ƒ / SInterfaces / toolboxUtilities.sim < prev    next >
Encoding:
Text File  |  1989-04-10  |  4.9 KB  |  139 lines  |  [TEXT/MPS ]

  1. % ---------------------------------------------------------------------------
  2. %    Class TOOLBOXUtilities
  3. %
  4. % the routines listed in Inside Macintosh chapter X: 
  5. % The code has been converted from the file ToolInft.p
  6. % In this module you find the interfaces to Geral utility procedures. 
  7. % You will find the programmers interface built on 
  8. % top of this interface in MacUtilities.
  9. %
  10. % 890317/Boris Magnusson
  11. %
  12. % ---------------------------------------------------------------------------
  13. class TOOLBOXUtilities;
  14. begin
  15.     ! General Utilities ;
  16.  
  17.     External TOOLBOX procedure x="$A858" is 
  18. Integer procedure TOOLBOXBitAnd(long1,long2); integer long1,long2;;
  19.  
  20.     External TOOLBOX procedure x="$A85B" is 
  21. Integer procedure TOOLBOXBitOr(long1,long2); integer long1,long2;;
  22.  
  23.     External TOOLBOX procedure x="$A859" is 
  24. Integer procedure TOOLBOXBitXor(long1,long2); integer long1,long2;;
  25.  
  26.     External TOOLBOX procedure x="$A85A" is 
  27. Integer procedure TOOLBOXBitNot(long1); integer long1;;
  28.  
  29.     External TOOLBOX procedure x="$A85C" is 
  30. Integer procedure TOOLBOXBitShift(long1,count); integer long1; short integer count;;
  31.  
  32.     External TOOLBOX procedure x="$A85D" is 
  33. Boolean procedure TOOLBOXBitTst(bytePtr,bitNum);name bytePtr; 
  34.         text bytePtr; integer bitNum;;
  35.  
  36.     External TOOLBOX procedure x="$A85E" is 
  37. procedure TOOLBOXBitSet(bytePtr,bitNum);name bytePtr; 
  38.         text bytePtr; integer bitNum;;
  39.  
  40.     External TOOLBOX procedure x="$A85F" is 
  41. procedure TOOLBOXBitClr(bytePtr,bitNum);name bytePtr; 
  42.         text bytePtr; integer bitNum;;
  43.  
  44. %    External TOOLBOX procedure x="$A867" is 
  45. %    procedure TOOLBOXLongMul(a, b: LONGINT; VAR dst: Int64Bit);
  46.  
  47.     External TOOLBOX procedure x="$A868" is 
  48. %    FixMul(a, b: Fixed): Fixed;
  49. integer procedure TOOLBOXFixMul(a, b);integer a,b;;
  50.  
  51.     External TOOLBOX procedure x="$A869" is 
  52. %    FixRatio(numer, denom: INTEGER): Fixed;
  53. Integer procedure TOOLBOXFixRatio(numer,denom); short integer numer,denom;;
  54.  
  55.     External TOOLBOX procedure x="$A86A" is 
  56. short Integer procedure TOOLBOXHiWord(x); integer x;;
  57.  
  58.     External TOOLBOX procedure x="$A86B" is 
  59. short Integer procedure TOOLBOXLoWord(x); integer x;;
  60.  
  61.     External TOOLBOX procedure x="$A86C" is 
  62. short Integer procedure TOOLBOXFixRound(x); integer x;;
  63.  
  64. %    External TOOLBOX procedure x="$A8CF" is 
  65. %    procedure TOOLBOXPackBits(VAR srcPtr, dstPtr: Ptr; srcBytes: INTEGER);
  66.  
  67. %    External TOOLBOX procedure x="$A8D0" is 
  68. %    procedure TOOLBOXUnPackBits(VAR srcPtr, dstPtr: Ptr; dstBytes: INTEGER);
  69.  
  70.     External TOOLBOX procedure x="$A8BC" is 
  71. %    SlopeFromAngle(angle: INTEGER): Fixed;
  72. Integer procedure TOOLBOXSlopeFromAngle(angle); short integer angle;;
  73.  
  74.     External TOOLBOX procedure x="$A8C4" is 
  75. %    AngleFromSlope(slope: Fixed): INTEGER;
  76. short Integer procedure TOOLBOXAngleFromSlope(slope); integer slope;;
  77.     
  78.     External TOOLBOX procedure x="$A94F" is 
  79. %    DeltaPoint(ptA, ptB: Point): LONGINT;
  80. Integer procedure TOOLBOXDeltaPoint(ptA_v, ptB_v); name pta_v,ptb_v; 
  81.         short integer pta_v,ptb_v;;
  82.  
  83.     External TOOLBOX procedure x="$A906" is 
  84. %    NewString(theString: Str255): StringHandle;
  85. Integer procedure TOOLBOXNewString(Str255);name Str255; text Str255;;
  86.  
  87.     External TOOLBOX procedure x="$A907" is 
  88. %    SetString(theString: StringHandle; strNew: Str255);
  89. procedure TOOLBOXSetString(StringHandle,Str255);name Str255; 
  90.         integer StringHandle; text Str255;;
  91.  
  92.     External TOOLBOX procedure x="$A9BA" is 
  93. %    GetString(stringID: INTEGER): StringHandle;
  94. Integer procedure TOOLBOXGetString(stringID); short integer StringID;;
  95.  
  96. %    External TOOLBOX procedure x="" is 
  97. %    procedure TOOLBOX  GetIndString(VAR theString: Str255; strListID: INTEGER;
  98. %                     index: INTEGER);
  99. %
  100. %    External TOOLBOX procedure x="$A9E0" is 
  101. %    Integer procedure TOOLBOX Munger(h: Handle; offset: LONGINT; ptr1: Ptr; len1: LONGINT;
  102. %                    ptr2: Ptr; len2: LONGINT): LONGINT;
  103. %    INLINE $A9E0;
  104.  
  105.     External TOOLBOX procedure x="$A9BB" is 
  106. %    GetIcon(iconID: INTEGER): Handle;
  107. Integer procedure TOOLBOXGetIcon(iconID); short integer iconID;;
  108.  
  109.     External TOOLBOX procedure x="$A94B" is 
  110. %    PlotIcon(theRect: Rect; theIcon: Handle);
  111.     procedure TOOLBOXPlotIcon(theRect_top,theIcon); name theRect_top;
  112.         short integer theRect_top; integer theIcon;;
  113.  
  114.     External TOOLBOX procedure x="$A9B9" is 
  115. %    GetCursor(cursorID: INTEGER): CursHandle;
  116. Integer procedure TOOLBOXGetCursor(cursorID); short integer cursorID;;
  117.     
  118.     External TOOLBOX procedure x="$A9B8" is 
  119. %    GetPattern(patID: INTEGER): PatHandle;
  120. Integer procedure TOOLBOXGetPattern(patID); short integer patID;;
  121.  
  122.     External TOOLBOX procedure x="$A9BC" is 
  123. %    GetPicture(picID: INTEGER): PicHandle;
  124. Integer procedure TOOLBOXGetPicture(picID); short integer picID;;
  125.  
  126. %    External TOOLBOX procedure x="" is 
  127. %    procedure TOOLBOX  GetIndPattern(VAR thePat: Pattern; patListID: INTEGER;
  128. %                        index: INTEGER);
  129.  
  130.     External TOOLBOX procedure x="$A855" is 
  131. %    ShieldCursor(shieldRect: Rect; offsetPt: Point);
  132. procedure TOOLBOXShieldCursor(shieldRect_top,offsetPt_v);
  133.         name shieldRect_top,offsetPt_v; short integer shieldRect_top,offsetPt_v;;
  134.  
  135. %    External TOOLBOX procedure x="" is 
  136. %    procedure TOOLBOXScreenRes(VAR scrnHRes, scrnVRes: INTEGER);
  137.  
  138.  
  139. END --- TOOLBOX Utilities --- ;